package com.ahdms.es.gm.constant;

import org.bouncycastle.asn1.ASN1ObjectIdentifier;
import org.bouncycastle.asn1.x509.Extension;

public interface IKIObjectIdentifiers {

    ASN1ObjectIdentifier ecc_pub_key = new ASN1ObjectIdentifier("1.2.840.10045.2.1"); //ecc 公钥标识

    String sm = "1.2.156.10197.1"; // 国家密码算法标识
    ASN1ObjectIdentifier sm_puk_matrix = new ASN1ObjectIdentifier(sm + ".300.1");//公钥矩阵密码算法标识
//    ASN1ObjectIdentifier sm_puk_matrix = new ASN1ObjectIdentifier("1.2.86.11.7.103");//公钥矩阵密码算法标识
    ASN1ObjectIdentifier sm_puk_combined = new ASN1ObjectIdentifier(sm + ".300.2");//加密公钥与签名公钥合并在一起的密码算法标识

    ASN1ObjectIdentifier sm_2 = new ASN1ObjectIdentifier(sm + ".301");//SM2算法标识
    ASN1ObjectIdentifier sm_2_sign = new ASN1ObjectIdentifier(sm_2 + ".1");//SM2签名算法标识
    ASN1ObjectIdentifier sm_2_exchange = new ASN1ObjectIdentifier(sm_2 + ".2");//SM2密钥交换标识
    ASN1ObjectIdentifier sm_2_encrypt = new ASN1ObjectIdentifier(sm_2 + ".3");//SM2加密算法标识

    ASN1ObjectIdentifier sm_3 = new ASN1ObjectIdentifier(sm + ".401");//SM3杂凑算法标识
    ASN1ObjectIdentifier sm_3_no_key = new ASN1ObjectIdentifier(sm_3 + ".1");//SM3密码杂凑算法，无密钥使用
    ASN1ObjectIdentifier sm_3_has_key = new ASN1ObjectIdentifier(sm_3 + ".2");//SM3密码杂凑算法，有密钥使用

    ASN1ObjectIdentifier sm_4 = new ASN1ObjectIdentifier(sm + ".104");//SM4
    ASN1ObjectIdentifier sm_4_ecb = new ASN1ObjectIdentifier(sm_4 + ".1");//SM4-ECB
    ASN1ObjectIdentifier sm_4_cbc = new ASN1ObjectIdentifier(sm_4 + ".2");//SM4-CBC

    ASN1ObjectIdentifier sm2_with_sm3 = new ASN1ObjectIdentifier("1.2.156.10197.1.501");//基于SM2算法和SM3算法的签名

    String content_type = "1.2.156.10197.6.1.4.2"; //SM2密码算法加密签名消息语法规范
    ASN1ObjectIdentifier data = new ASN1ObjectIdentifier(content_type + ".1");
    ASN1ObjectIdentifier signed_data = new ASN1ObjectIdentifier(content_type + ".2");
    ASN1ObjectIdentifier enveloped_data = new ASN1ObjectIdentifier(content_type + ".3");
    ASN1ObjectIdentifier signed_and_enveloped_data = new ASN1ObjectIdentifier(content_type + ".4");
    ASN1ObjectIdentifier encrypted_data = new ASN1ObjectIdentifier(content_type + ".5");
    ASN1ObjectIdentifier key_agreement_info = new ASN1ObjectIdentifier(content_type + ".6");

    //外部序列号及签名oid
    ASN1ObjectIdentifier externalSerialNumberOid = new ASN1ObjectIdentifier("1.3.6.1.5.5.8.8.1");
    ASN1ObjectIdentifier externalSerialNumberSignValueOid = new ASN1ObjectIdentifier("1.3.6.1.5.5.8.8.2");

    //移动Key
    ASN1ObjectIdentifier regCtrl_mk = new ASN1ObjectIdentifier("1.3.6.1.5.5.7.5.1.111");

    //IKI平台类型以及网证扩展项OID
    ASN1ObjectIdentifier regCtrl_ctid = new ASN1ObjectIdentifier("1.3.6.1.5.5.7.5.1.112");

    //IKI平台系统设备标识
    ASN1ObjectIdentifier regCtrl_system_cert = new ASN1ObjectIdentifier("1.3.6.1.5.5.7.5.1.110");

    //ctid条目扩展项OID
    ASN1ObjectIdentifier id_wze = new ASN1ObjectIdentifier("2.6.30.21");

    //TID签名扩展项
    ASN1ObjectIdentifier tid_sign = new ASN1ObjectIdentifier("2.6.30.22");
    ASN1ObjectIdentifier tid_dn = new ASN1ObjectIdentifier("2.6.30.23");

    //可信标识发布点
    ASN1ObjectIdentifier uid_distribution_points = new ASN1ObjectIdentifier("2.6.30.24");

    /**
     * 颁发机构密钥标识符
     */
    ASN1ObjectIdentifier authority_key_identifier = Extension.authorityKeyIdentifier;

    /**
     * 主体密钥标识符
     */
    ASN1ObjectIdentifier subject_key_identifier = Extension.subjectKeyIdentifier;

    /**
     * 颁发机构信息访问
     */
    ASN1ObjectIdentifier authority_info_access = Extension.authorityInfoAccess;

    /**
     * IRL发布点
     */
    ASN1ObjectIdentifier crl_distribution_points = Extension.cRLDistributionPoints;

    /**
     * 基本限制
     */
    ASN1ObjectIdentifier basic_constraints = Extension.basicConstraints;

    /**
     * 密钥用法
     */
    ASN1ObjectIdentifier key_usage = Extension.keyUsage;

    /**
     * 增强型密钥用法
     */
    ASN1ObjectIdentifier extended_key_usage = Extension.extendedKeyUsage;


    /**
     * 数字证书国内通用扩展项
     */
    String commonInChina = "1.2.156.10260.4.1";
    /**
     * 个人身份标识码
     */
    ASN1ObjectIdentifier identify_code = new ASN1ObjectIdentifier(commonInChina + ".1");

    /**
     * 个人社会保险号
     */
    ASN1ObjectIdentifier insurance_number = new ASN1ObjectIdentifier(commonInChina + ".2");

    /**
     * 企业工商注册号
     */
    ASN1ObjectIdentifier ic_registration_number = new ASN1ObjectIdentifier(commonInChina + ".3");

    /**
     * 企业组织机构代码
     */
    ASN1ObjectIdentifier oraganization_code = new ASN1ObjectIdentifier(commonInChina + ".4");

    /**
     * 企业税号
     */
    ASN1ObjectIdentifier taxation_number = new ASN1ObjectIdentifier(commonInChina + ".5");

    /**
     * 可信标识载体
     */
    ASN1ObjectIdentifier uid_identity_device = new ASN1ObjectIdentifier("1.2.86.11.7.100");

    /**
     * 实体标识编码
     */
    ASN1ObjectIdentifier uid_identity_value = new ASN1ObjectIdentifier("1.2.86.11.7.101");

    /**
     * 可信标识版本
     */
    ASN1ObjectIdentifier uid_identity_version = new ASN1ObjectIdentifier("1.2.86.11.7.102");

    /**
     * 可信标识模板OID
     */
    ASN1ObjectIdentifier uid_identity_template = new ASN1ObjectIdentifier("1.2.86.11.7.104");
}

